import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

import org.apache.commons.io.IOUtils;

import com.swf.seed.triutil.lang.SdFileUtils;
import com.swf.seed.triutil.lang.SdIOUtils;


public class TEst {
	public static void main(String[] args) {
		File file = SdFileUtils.getFile("a.txt");
		try {
			String content = IOUtils.toString(new FileInputStream(file),"GBK");
			System.out.println(content.replaceAll("\\s+", "|1,")+"|1");
			System.out.println(content.replaceAll("\\s+", ",")+"");
			/*	for (String s:content.split("\\W+")){
				System.out.println(" <set key=\""+s+"\" value=\"1\"/>");
			}*/
		} catch (FileNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
